package org.weasel.base;

import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.weasel.views.Navigator;
import org.weasel.views.Welcome;

public class Perspective implements IPerspectiveFactory {
	
	public static IPageLayout actualLayout;

	/***
	 * This method sets up the initial layout of the GUI
	 */
	public void createInitialLayout(IPageLayout layout) {
		actualLayout = layout;
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		
		layout.addView(Navigator.ID, IPageLayout.LEFT, 0.25f, editorArea);
		layout.addView(Welcome.ID, IPageLayout.RIGHT, 0.75f, editorArea);
//		IFolderLayout folder = layout.createFolder(Welcome.ID, IPageLayout.TOP, 0.5f, editorArea);
//		folder.addPlaceholder(Welcome.ID + ":*");
//		folder.addView(Welcome.ID);
		
		layout.getViewLayout(Navigator.ID).setCloseable(false);
	}
}
